<template>
  <!--诊断日志记录 -->
  <div class="diagnostic box-shadow">
    <el-tabs v-model="diagnosticType">
      <el-tab-pane :label="$t('ARM板')" name="0">
        <arm v-if="diagnosticType == 0"></arm>
      </el-tab-pane>
      <el-tab-pane :label="$t('网络连接强度')" name="1">
        <networkConnect v-if="diagnosticType == 1"></networkConnect>
      </el-tab-pane>
      <el-tab-pane :label="$t('电池')" name="2">
        <battery v-if="diagnosticType == 2"></battery>
      </el-tab-pane>
      <el-tab-pane :label="$t('行走电机')" name="3">
        <walkingMotor v-if="diagnosticType == 3"></walkingMotor>
      </el-tab-pane>
      <el-tab-pane :label="$t('转向电机')" name="4">
        <steeringMotor v-if="diagnosticType == 4"></steeringMotor>
      </el-tab-pane>
      <el-tab-pane :label="$t('升降电机')" name="5">
        <liftingMotor v-if="diagnosticType == 5"> </liftingMotor>
      </el-tab-pane>
      <el-tab-pane :label="$t('云台电机')" name="6">
        <cloudMotor v-if="diagnosticType == 6"></cloudMotor>
      </el-tab-pane>
      <el-tab-pane :label="$t('雨刷电机')" name="7">
        <wiperMotor v-if="diagnosticType == 7"> </wiperMotor>
      </el-tab-pane>
      <el-tab-pane :label="$t('障碍物距离')" name="8">
        <distance v-if="diagnosticType == 8"></distance>
      </el-tab-pane>
      <el-tab-pane :label="$t('导航置信度')" name="9">
        <navigation v-if="diagnosticType == 9"></navigation>
      </el-tab-pane>
    </el-tabs>
  </div>
</template>
<script>
/**
 * 日志查看-诊断日志
 */
import arm from "./arm.vue";
import networkConnect from "./networkConnect.vue";
import battery from "./battery.vue";
import walkingMotor from "./walkingMotor.vue";
import steeringMotor from "./steeringMotor.vue";
import liftingMotor from "./liftingMotor.vue";
import cloudMotor from "./cloudMotor.vue";
import wiperMotor from "./wiperMotor.vue";
import distance from "./distance.vue";
import navigation from "./navigation.vue";
export default {
  components: {
    arm,
    networkConnect,
    battery,
    walkingMotor,
    steeringMotor,
    liftingMotor,
    cloudMotor,
    wiperMotor,
    distance,
    navigation,
  },
  data() {
    return {
      // tabs切换type
      diagnosticType: "0",
    };
  },
  name: "diagnostic",
  watch: {
    // 监听tabs切换
    diagnosticType(val) {
      this.diagnosticType = val;
    },
  },
  methods: {},
};
</script>
<style lang="scss">
.tooltips {
  width: 100%;
  height: 40px;
  line-height: 40px;
  padding-left: 16px;
  background: #0f1a23;
  margin: 24px 0 16px 0;
  span {
    display: block;
    font-size: 14px;
    color: #ffad30;
  }
}
.chartBox {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
}
</style>
